package serverTier;

import java.util.List;
import java.util.Set;

import javax.ejb.Local;

import domain.*;


//Service class
@Local
public interface AccessInterfaceLocal {
	public List<Author> getAllAuthors() ;
	public void addUser(AccUser newGPU);//throws SystemUnavailableException;//the more complicated version mod11pg6;
	public List<AccUser> getAllUser();
	public AccUser searchbByEmail(String Name);
	public void RemoveUser(int Mid);
        public void addRef (String email,Reference newRef);
        public void addAuthor (String email,Author newAuthor);
        public Author searchbByANAME(String name);
        public Translator searchbByANAMEtrans(String name);
        public Author  searchbByASURNAME(String surname);
        public Reference addPublisher(int oldPubID, int RefID,String SelectedReferencePub,String SelectedReferencePubcountry);
        //public void addRefBig(Publisher p, Reference r, Set<Author> aa, Set<Author> tt, String email);
        public void addRefBig(Reference r, String email);
        public boolean UserExist(int id,String email);
        public void updateUser( int id,String name, String email, String password);
        public List<Author> getallAuthors(int id);
        public void deleteAuthor(String email,int id) ;
        public void updateAuthor(Author a);
        public List<Reference> getAllRef(int id);
        public void deleteReference(String email, int id);
        public void updateReference(Reference r);
        public void deletePub(String Pname, String Pcountry, Reference r);
        public Reference linkAuthor(Reference selectedReference,Author newAuthor);
        public Reference linkTAuthor(Reference selectedReference,Translator translator);
        public Reference unlinkAuthor(Reference selectedReference, Author selectedAuthor);
        public Reference unlinkTAuthor(Reference selectedReference, Translator selectedTranslator);
        public AccUser addAcademicSet(int id, String setName);
        public List<AcademicSet> getAllAcademicSets(int id);
        public AcademicSet removeRefToSet(AcademicSet selectedAcademicSet,Reference selectedSetReference);
        public AcademicSet addRefToSet(AcademicSet selectedSet, Reference selectedRef);
        public void deleteSelectedAcademicSet(AcademicSet selectedAcademicSet,AccUser current);
        public void renameSelectedAcademicSet(AcademicSet selSet, String selectedAcademicSetName);
        public List<Format> allFormats(int id);
        public AccUser addFormat(int l, Format f);
        public void deleteSelectedFormat(Format selectedFormat, AccUser current);
        public void renameSelectedFormat (Format selFOR, String selectedFormatName); 
}
 